@group(0) @binding(0) var<uniform> modelmatrix : mat4x4<f32>;
@group(0) @binding(1) var<uniform> viewmatrix : mat4x4<f32>;
@group(0) @binding(2) var<uniform> projectionmatrix : mat4x4<f32>;
struct Output {
    @builtin(position) position: vec4<f32>,
};

@vertex
fn vs_main(@location(0) position: vec4<f32>) -> Output {
    var out: Output;
    var position1 = projectionmatrix * viewmatrix * modelmatrix * position;
    out.position = (position1 + vec4<f32>(0.0, 0.0, 1.0, 1.0)) * 0.5;
    // out.position = position;
    return out;
}


@fragment
fn fs_main(@builtin(position) fragPosition: vec4<f32>) -> @location(0) vec4<f32> {
    return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}